//头部时间
$(window).scroll(function(){
    if( $(this).scrollTop() != 0){
        $(".headerone").css('opacity','0');
        $(".headertow").css('display','block');
    }else{
        $(".headerone").css('opacity','1');
        $(".headertow").css('display','none');
    }
})
//登录注册
var shut = document.getElementById("shut");
var sign = document.getElementById("signBut");
sign.onclick=function(){
    document.getElementById("login").style.display = "block";
}
shut.onclick=function(){
    document.getElementById("login").style.display = "none";
}
//注册
var registerBut = document.getElementById("registerBut");
var shutZc = document.getElementById("shutZc");
registerBut.onclick=function(){
    document.getElementById("enroll").style.display = "block";
}
shutZc.onclick=function(){
    document.getElementById("enroll").style.display = "none";
}




//初始化显示/隐藏
window.onload=function(){

    var listWidth = document.body.clientWidth;
    if( listWidth < 960){
        $(".search").css("display","none")
    }else{
        $(".search").css("display","block")
    }

    var hei = $(".listCdsb").width();
    var height = hei*2/3;
    $(".listImgWth").height(height);
};
//手动缩放
window.onresize=function(){
    var listWidth = document.body.clientWidth;
    if( listWidth < 960){
        $(".search").css("display","none")
    }else{
        $(".search").css("display","block")
    }

    var hei = $(".listCdsb").width();
    var height = hei*2/3;
    $(".listImgWth").height(height);
};


$(".mainHede").click(function(event) {
    $(".modular ").addClass("layui-anim layui-anim-scale");
});



//二级选项卡
// var list = $(".mainHede li").index();
// $(".modular").
// $(".mainHede li").click(function(event) {
//     $(this).index()
// });


// $(".listImgWth").hover(function(){
//     $(this).children('img').addClass('layui-anim layui-anim-scale')
// })
